<div>
    <div class="ibox">
        <div class="ibox-title">
            <h5>商品信息</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">商品名称</label>
                <div class="col-sm-5">
                    <input v-model="addProductInfo.prodName" type="text" placeholder="必填，请填写商品名称" class="form-control">
                </div>
                <label class="col-sm-1 col-form-label text-right">商品分组</label>
                <div class="col-sm-5">
                    <select class="custom-select" v-model="addProductInfo.categoryId">
                        <option selected disabled value="">必填，请选择商品分组</option>
                        <option v-for="(item,index) in addProductInfo.productCategorys" :value="item.categoryId">
                            {{item.categoryName}}
                        </option>
                    </select>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">单位</label>
                <div class="col-sm-8">
                    <input v-model="addProductInfo.unitName" type="text" placeholder="必填，请填写单位" class="form-control" style="width: 20%;display: inline;">
				
					<label for="">快速输入</label>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('盒')">盒</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('包')">包</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('件')">件</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('瓶')">瓶</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('个')">个</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('箱')">箱</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('张')">张</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('罐')">罐</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('桶')">桶</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('根')">根</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('袋')">袋</button>
					<button  class="btn btn-info btn-sm" v-on:click="_quickunitName('把')">把</button>
                </div>
                <label class="col-sm-1 col-form-label text-right">排序</label>
                <div class="col-sm-2">
                    <input v-model="addProductInfo.sort" type="text" placeholder="必填，请填写排序" class="form-control">
                </div>
            </div>
            <!-- <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">关键词</label>
                <div class="col-sm-5">
                    <input v-model="addProductInfo.keyword" type="text" placeholder="必填，请填写关键词,多个关键词用;或空格分隔"
                        class="form-control">
                </div>
                <label class="col-sm-1 col-form-label text-right">手机菜单</label>
                <div class="col-sm-5">
                    <div class="checkbox custom-control-inline" v-for="(item,index) in addProductInfo.housekeepingTypes"
                        :key="index">
                        <label>
                            <input type="checkbox" v-model="addProductInfo.hktIds" :value="item.hktId">
                            <span>{{item.hktName}}</span>
                        </label>
                    </div>
                </div>
            </div> -->
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">仓库</label>
                <div class="col-sm-5">
                    <select class="custom-select" v-model="addProductInfo.shId"
                        @change="_changeShopHouseAdd(addProductInfo.shId)">
                        <option selected disabled value="">请选择仓库</option>
                        <option v-for="(item,index) in addProductInfo.shopHouses" :value="item.shId">
                            {{item.shName}}
                        </option>
                    </select>
                </div>
                <label class="col-sm-1 col-form-label text-right">库存警告数量</label>
                <div class="col-sm-5">
                    <input class="form-control" v-model="addProductInfo.warnStock" placeholder="必填，请填写库存警告数量"
                        type="number" />
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">商品简介</label>
                <div class="col-sm-11">
                    <textarea v-model="addProductInfo.prodDesc" placeholder="必填，请填写商品简介" maxlength="250"
                        class="form-control"></textarea>
                </div>
            </div>

        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>商品图片</h5>
            <div class="ibox-tools" style="top:10px;">
            </div>
        </div>
        <div class="ibox-content">
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">商品封面</label>
                <div class="content-img col-sm-11">
                    <vc:create path="frame/uploadImageUrl" callBackListener="addProduct"
                        callBackFunction="notifyUploadCoverImage" namespace="addProductCover" imageCount="1">
                    </vc:create>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">商品轮播</label>
                <div class="content-img col-sm-11">
                    <vc:create path="frame/uploadImageUrl" callBackListener="addProduct"
                        callBackFunction="notifyUploadCarouselFigureImage" namespace="addProductCarouselFigure"
                        imageCount="3">
                    </vc:create>
                </div>
            </div>

        </div>
    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>商品规格</h5>
            <div class="ibox-tools" style="top:10px;">
                <button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddSpecModal()">
                    <i class="fa fa-plus"></i>添加
                </button>
            </div>
        </div>
        <div class="ibox-content">
            <table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
                <thead>
                    <tr>
                        <th class="text-center">规格名称</th>
                        <!-- <th class="text-center">库存</th> -->
                        <!-- <th class="text-center">销量</th> -->
                        <th class="text-center">售价</th>
                        <th class="text-center">成本价</th>
                        <!-- <th class="text-center">业主价</th>
                        <th class="text-center">会员价格</th>
                        <th class="text-center">市场价</th>
                        <th class="text-center">抵扣物业费</th> -->
                        <th class="text-center">条形码</th>
                        <th class="text-center">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <tr v-for="productSpec in addProductInfo.productSpecs">
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.specName" placeholder="请输入规格名称" type="text" />
                        </td>
                        <!-- <td class="text-center">
                            <input class="form-control" v-model="productSpec.stock" type="number" />
                        </td> -->
                        <!-- <td class="text-center">
                            <input class="form-control" v-model="productSpec.sales" type="number" />
                        </td> -->
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.price" type="number" />
                        </td>
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.costPrice" type="number" />
                        </td>
                        <!-- <td class="text-center">
                            <input class="form-control" v-model="productSpec.ownerPrice" type="number" />
                        </td>
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.vipPrice" type="number" />
                        </td>
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.otPrice" type="number" />
                        </td>
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.deduction" type="number" />
                        </td> -->
                        <td class="text-center">
                            <input class="form-control" v-model="productSpec.barCode" type="text">
                        </td>
                        <td class="text-center">
                            <div class="btn-group">
                                <button class="btn-white btn btn-xs"
                                    v-on:click="_openAddDeleteProductSpec(productSpec)">删除
                                </button>
                            </div>
                            <div class="btn-group" v-if="productSpec.isDefault != 'T'">
                                <button class="btn-white btn btn-xs"
                                    v-on:click="_doAddDefaultProductSpec(addProductInfo,productSpec)">默认规格
                                </button>
                            </div>
                        </td>
                    </tr>
                </tbody>
            </table>
            <!-- <div><span>抵扣金：商品购买时抵扣金会自动送客户用来 缴相应的物业费停车费</span></div> -->
        </div>

    </div>

    <div class="ibox">
        <div class="ibox-title">
            <h5>商品扩展</h5>
            <div class="ibox-tools" style="top:10px;">

            </div>
        </div>
        <div class="ibox-content">
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">商品状态</label>
                <div class="col-sm-11">
                    <select class="custom-select" v-model="addProductInfo.state">
                        <option selected disabled value="">选填，请选择状态</option>
                        <option value="1001">未上架</option>
                        <option value="2002">上架</option>
                    </select>
                </div>
            </div>
            <div class="form-group row">
                <label class="col-sm-1 col-form-label text-right">商品详情</label>
                <div class="col-sm-11 ">
                    <div class=" no-padding">
                        <div class="summernote"></div>
                    </div>
                    <!--<textarea v-model="addNoticeViewInfo.context" cols="3"  type="text" placeholder="必填，请填写公告内容" class="form-control"></textarea>-->
                </div>
            </div>
            <div class="ibox-content">
                <button class="btn btn-primary float-right" type="button" v-on:click="saveProductInfo()"><i
                        class="fa fa-check"></i>&nbsp;保存</button>
                <button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
                    v-on:click="_closeAddProduct()">取消</button>
            </div>

        </div>


    </div>
</div>